
/**********************Ore box**************************/

/obj/structure/ore_box
	icon = 'icons/obj/mining.dmi'
	icon_state = "orebox"
	name = "Mineral Box"
	desc = "It's heavy. Stores ores and sheets taken from mother nature herself."
	density = 1
	opacity = 1

/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
	if (istype(W, /obj/item/weapon/ore))
		src.contents += W;
	if (istype(W, /obj/item/stack))
		src.contents += W;
	if (istype(W, /obj/item/weapon/storage))
		var/obj/item/weapon/storage/S = W
		for(var/obj/item/weapon/ore/O in W.contents)
			S.remove_from_storage(O, src) //This will move the item to this item's contents
		for(var/obj/item/stack/C in W.contents)
			S.remove_from_storage(C, src) //This will move the item to this item's contents
		user << "\blue You empty [W.name]'s minerals into the box."
	return

/obj/structure/ore_box/attack_hand(obj, mob/user as mob)
	for (var/obj/item/weapon/ore/O in contents)
		contents -= O
		O.loc = src.loc
	for (var/obj/item/stack/C in contents)
		contents -= C
		C.loc = src.loc
	user << "\blue You empty the box of it's minerals."
	return


/**********************Plant box**************************/

/obj/structure/plant_box
	icon = 'icons/turf/mining.dmi'
	icon_state = "plantbox"
	name = "Plant Box"
	desc = "It's heavy. Stores plants and food."
	density = 1
	opacity = 1

/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
	if (istype(W, /obj/item/weapon/reagent_containers/food))
		src.contents += W;
	if (istype(W, /obj/item/weapon/storage))
		var/obj/item/weapon/storage/S = W
		for(var/obj/item/weapon/reagent_containers/food/O in W.contents)
			S.remove_from_storage(O, src) //This will move the item to this item's contents
		user << "\blue You empty [W.name]'s food into the box."
	return

/obj/structure/ore_box/attack_hand(obj, mob/user as mob)
	for (var/obj/item/weapon/reagent_containers/food/O in contents)
		contents -= O
		O.loc = src.loc
	user << "\blue You empty the box of it's food."
	return
